#!d:\perl\bin\perl.exe



use strict;

use warnings;

use Template;

use CGI;



$| = 1;



my $cgi   = CGI->new( );

my $tt    = Template->new( );

my $input = 'cgicookie.html';

my @cookies;

my $vars  = {

    cgi     => $cgi,

    cookies => \@cookies,

};

my $output;



$tt->process($input, $vars, \$output)

    || die $tt->error( );



if (@cookies) {

    @cookies = ('-cookie', [ @cookies ]);

}



print $cgi->header(@cookies), $output;
